home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir39
/
clipboot.zip
/
ENVED.PRG
< prev
next >
Wrap
Text File
|
1993-05-03
|
3KB
|
66 lines
/*┌──────────────────────────────────────────────────────────────────────┐
▌│ Program Name: ENVED.PRG Copyright: Gallagher Computing Corp. │
▌│ Language: Clipper 5.0 Author: Kevin S Gallagher │
▌└──────────────────────────────────────────────────────────────────────┘
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ */
#include "include1.h"
#define M_COORDS 2,1,maxrow()-2,maxcol()-1
#define M_LINES 120
function EnvEditor()
local oldins := readinsert(.T.), oldcolor := setcolor(DOSCOLOR)
local cEnvBlock :="", cCheckBuf :="", cBuf0 :="", cBuf1 :="", cBuf2 :=""
local nNumOfEnvs:= 0, i := 0
local SaveFullScreen()
nNumOfEnvs := FT_GETE( @cEnvBlock )
cCheckBuf := cEnvBlock
setcursor(1)
@0,0 say padc("Environment Editor",80) color MENUCOLOR
@maxrow(),0 say ;
padr(" Your current Environment Table is Displayed. "+;
"Edit and F10 to Save Esc to Abort",80) color MENUCOLOR
dispbox(1,0,maxrow()-1,maxcol(),"┌─┐│┘─└│ ",DOSCOLOR)
cEnvBlock := memoedit( cEnvBlock, M_COORDS, .t. , "EMemo" ,M_LINES )
if cCHeckBuf != cEnvBlock
nNumOfEnvs:= mlcount( cEnvBlock, M_LINES)
for i := 1 to nNumOfEnvs
cBuf0 := memoline( cEnvBlock, M_LINES, i)
cBuf1 := subs( cBuf0,1,at("=",cBuf0) -1 )
cBuf2 := subs( cBuf0, at("=",cBuf0) +1 )
if i > envcount()
if !empty(cBuf1)
if !empty(cBuf2)
if EnvUsed() <= EnvSize()
//───── add string to master environment table
setenv( cBuf1, RTRIM(cBuf2) )
else
#ifdef MR_GRUMP
ERR_MSG("OPERATION FAILED TO ADD STRING")
#else
alert("ERROR")
#endif
endif
endif
endif
loop
endif
DELenv( cBuf1 )
if !empty(cBuf2)
//───── modifiy an exist string in the master table
SETenv( cBuf1, RTRIM(cBuf2) )
else
//───── delete string from the master environment table
endif
next
endif
readinsert(oldins)
setcursor(0)
RestFullScreen()
setcolor(oldcolor)
return nil